package com.huatai.common.log.service;


import com.huatai.common.api.R;
import com.huatai.common.entity.SysOperLog;
import com.huatai.common.util.logUtil.SecurityConstants;
import com.huatai.common.util.logUtil.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 日志服务
 *
 * @author zsj
 */
//@FeignClient(name = "ht-user", fallbackFactory = RemoteLogFallbackFactory.class)
//@FeignClient(HT_USER)
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteLogService
{
    /**
     * 保存系统日志
     *
     * @param sysOperLog 日志实体
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping("/operlog")
    public R<Boolean> saveLog(SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
}
